using System.Windows;

namespace HostComputerPlatform.Views
{
    public partial class SelectSaveLoadModeDialogWindow : Window
    {
        public enum SaveLoadMode
        {
            SingleFile,
            ProjectFolder
        }

        public SaveLoadMode SelectedMode { get; private set; } = SaveLoadMode.SingleFile;

        public SelectSaveLoadModeDialogWindow(string title = "请选择保存/加载方式")
        {
            InitializeComponent();
            this.Title = title;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            if (ProjectFolderRadio.IsChecked == true)
                SelectedMode = SaveLoadMode.ProjectFolder;
            else
                SelectedMode = SaveLoadMode.SingleFile;
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }
    }
} 